<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8"/>
    <title></title>
    <style type="text/css">
        .contain{
            -webkit-perspective: 1200px;
            -moz-perspective: 1200px;
        }
        .box{
            -webkit-perspective: 1200px;
            -moz-perspective: 1200px;
            height: 100px;
            width: 400px;
            position: relative;
            background-color: #fafafa;
        }
        .front{
            width: 60%;
            height: 60%;
            position: absolute;
            top: 20%;
            left: 20%;
            background-color: #9cf;
            -webkit-transform: rotateX(5deg) translateZ(30px);
            -moz-transform: rotateX(5deg) translateZ(30px);
            -webkit-transition: -webkit-transform .5s linear;
            -moz-transition: -moz-transform .5s linear;
        }
        .bottom{
            width: 60%;
            height: 60%;
            position: absolute;
            top: 20%;
            left: 20%;
            background-color: #85b2de;
            -webkit-transform: rotateX(-85deg) translateZ(30px);
            -moz-transform: rotateX(-85deg) translateZ(30px);
            -webkit-transition: -webkit-transform .5s linear;
            -moz-transition: -moz-transform .5s linear;
        }

        p{
            margin: 0;
            text-align: center;
            line-height: 60px;
            font-family: "微软雅黑";
        }
        .box:hover .front{
            -webkit-transform: rotateX(85deg) translateZ(30px);
            -moz-transform: rotateX(85deg) translateZ(30px);
            -webkit-transition: -webkit-transform .5s linear;
            -moz-transition: -moz-transform .5s linear;
        }
        .box:hover .bottom{
            -webkit-transform: rotateX(-5deg) translateZ(30px);
            -moz-transform: rotateX(-5deg) translateZ(30px);
            -webkit-transition: -webkit-transform .5s linear;
            -moz-transition: -moz-transform .5s linear;
        }
    </style>

</head>
<body>
    <div class="contain">
        <div class="box">
            <div class="front">
                <p>正面</p>
            </div>
            <div class="bottom">
                <p>底部</p>
            </div>
        </div>
    </div>
</body>
</html>